package cn.iocoder.yudao.module.book.controller.app.community.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "APP - 社区动态响应 VO")
@Data
public class CommunityPostRespVO {

    @Schema(description = "动态ID", example = "1")
    private Long postId;

    @Schema(description = "用户ID", example = "123")
    private Integer userId;

    @Schema(description = "用户昵称", example = "小明")
    private String username;

    @Schema(description = "用户头像", example = "http://example.com/avatar.jpg")
    private String avatar;

    @Schema(description = "分类", example = "study")
    private String category;

    @Schema(description = "分类名称", example = "学习记录")
    private String categoryName;

    @Schema(description = "标题", example = "我的学习心得")
    private String title;

    @Schema(description = "内容", example = "今天学习了...")
    private String content;

    @Schema(description = "学习时长", example = "1小时30分")
    private String studyDuration;

    @Schema(description = "阅读页数", example = "25页")
    private String studyPages;

    @Schema(description = "学习内容", example = "学习了英语单词")
    private String studyContent;

    @Schema(description = "图片列表")
    private List<String> images;

    @Schema(description = "话题列表")
    private List<String> topics;

    @Schema(description = "点赞数", example = "12")
    private Integer likesCount;

    @Schema(description = "评论数", example = "5")
    private Integer commentsCount;

    @Schema(description = "分享数", example = "2")
    private Integer sharesCount;

    @Schema(description = "是否已点赞", example = "false")
    private Boolean isLiked;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "相对时间", example = "2小时前")
    private String time;

}
